Index | Conventions

api/v1/stock/{stockno}/qtybylocations

Path: api/v1/stock/{stockno}/qtybylocations

This API is JSON:API compliant.

This endpoint supports the following methods:
GET

This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.

The resource type for this endpoint is StockQtyByLocations
The identifier is stockNo-locationNo

Attributes

The StockQtyByLocations resource type attributes are as follows:

AttributeTypeDescription
availablenumberHow many are available for sale.
backOrdernumberQuantity on Back Order.
branchCodestringThe branch code.
Branches are optional in Jim2 - this is only set when your site is configured to use branches.
Note: Will not be returned in the response if value is null.
branchNointegerThe internal branch number used to identify the branch.
Branches are optional in Jim2 - this is only set when your site is configured to use branches.
Note: Will not be returned in the response if value is null.
comittednumberHow many are required for jobs.
companyCodestringThe code of the card file linked to the company.
Multi-company is optional in Jim2 - this is only set when your site is configured to use multiple companies.
Note: Will not be returned in the response if value is null.
companyNointegerThe internal company number used to identify the location.
Multi-company is optional in Jim2 - this is only set when your site is configured to use multiple companies.
Note: Will not be returned in the response if value is null.
locationCodestringThe location code where the stock is located.
locationNointegerThe internal location number used to identify the location.
manufacturingnumberQuantity being manufactured. This will only be returned if the stock is set as manufactured.
Note: Will not be returned in the response if value is null.
onHandnumberHow many are currently in stock.
onPOnumberHow many are listed in purchase orders which are not received or finished.
onTransfernumberHow many are currently on transfer to this location.
reservednumberHow many are currently in jobs which are reserved/ready.

Example GET (Return all)

Path: api/v1/stock/2/qtybylocations

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above).

Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.

{
    "data": [
        {
            "id": "2-1",
            "type": "StockQtyByLocations",
            "attributes": {
                "companyNo": 1,
                "companyCode": "HEADOFFICE",
                "branchNo": 1,
                "branchCode": "ACT",
                "locationNo": 1,
                "locationCode": "ACT",
                "onHand": 152.0000,
                "comitted": 109.0000,
                "onTransfer": 0.0,
                "reserved": 5.0000,
                "onPO": 46.0000,
                "available": 43.0000,
                "backOrder": 0.0000,
                "manufacturing": 8.0000
            }
        },
        {
            "id": "2-2",
            "type": "StockQtyByLocations",
            "attributes": {
                "locationCode": "nsw",
                "onHand": 12.0000
            }
        }
	]
}

Example GET (Return specific)

Path: api/v1/stock/2/qtybylocations/2-2

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
    "data": {
		"id": "2-2",
		"type": "StockQtyByLocations",
		"attributes": {
			"companyNo": 1,
			"companyCode": "HEADOFFICE",
			"branchNo": 2,
			"branchCode": "NSW",
			"locationNo": 2,
			"locationCode": "nsw",
			"onHand": 12.0000,
			"comitted": 10.0000,
			"onTransfer": 0.0,
			"reserved": 0.0000,
			"onPO": 0.0000,
			"available": 2.0000,
			"backOrder": 0.0000,
			"manufacturing": 4.0000
		}
	}
}